import React from "react";
export default class Movie extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      routeP: props.match.params, //一进入到组件我们就把上一级传递的参数赋值过来
    };
  }
  render() {
    console.log(this.state.routeP);
    // console.log(this.props.match.params);
    return (
      <div>
        Movie---
        <span>
          {this.state.routeP.type}---{this.state.routeP.id}
        </span>
        {/* <span>{this.props.match.params.type}</span> */}
      </div>
    );
  }
}
